import request from '@/utils/request'

// 查询设备最新数据
export function getDeviceLatestData(deviceCode) {
  return request({
    url: '/iot/data/latest/code/' + deviceCode,
    method: 'get'
  })
}

// 查询设备历史数据
export function getDeviceHistoryData(deviceId, query) {
  return request({
    url: '/iot/data/history/' + deviceId,
    method: 'get',
    params: query
  })
} 